package com.key.w8.http1.connection;

import com.key.w8.common.execute.ChainExecuteHandler;
import com.key.w8.http1.connection.connectionImpl.ClientHttp1PersistentConnection;

/**
 * @Author: k8
 * @CreateTime: 2025-03-09
 * @Version: 1.0
 */
public interface ConnectionBuilder<E extends Connection,T extends Object> {
    void addExecuteHandler(ChainExecuteHandler handler);
    void addExecuteErrorHandler(ChainExecuteHandler handler);
    void addErrorListener(Connection.ErrorListener errorListener);
    void addCloseListener(Connection.CloseListener closeListener);
    void addCreatedListener(Connection.CreatedListener createdListener);
    default void addWriteRequestListener(Connection.WriteRequestListener writeRequestListener){}
    default E build(){
        return null;
    }
    default E build(String host, int port){ return null; }
    default E build(T attach){
        return null;
    }


}
